home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Apple Shared Library Manager / ASLM Examples / Example Tools / Sources / TMethodNotifierExample.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-19  |  1.2 KB  |  45 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        TMethodNotifierExample.h
  3.  
  4.     Contains:    Definition for a class that has a method that used by a TMethodNotifier
  5.                 for notification.
  6.  
  7.     Copyright:    © 1993 by Apple Computer, Inc., all rights reserved.
  8.  
  9. */
  10.  
  11. #ifndef __TMETHODNOTIFIERREXAMPLE__
  12. #define __TMETHODNOTIFIERREXAMPLE__
  13.  
  14. ///————————————————————————————————————————————————————————————————————————————————————
  15. /// TNotifyHandler
  16. ///————————————————————————————————————————————————————————————————————————————————————
  17.  
  18. class TNotifyHandler: public TDynamic {
  19.     public:
  20.                      TNotifyHandler();
  21.         virtual         ~TNotifyHandler();
  22.         void MyNotifyMethod(EventCode, OSErrParm, void*);
  23. };
  24.  
  25. ///————————————————————————————————————————————————————————————————————————————————————
  26. /// TNotifyHandler IMPLEMENTATION
  27. ///————————————————————————————————————————————————————————————————————————————————————
  28.  
  29.     TNotifyHandler::TNotifyHandler()
  30.     {
  31.     }
  32.     
  33.     TNotifyHandler::~TNotifyHandler()
  34.     {
  35.     }
  36.     
  37.     void TNotifyHandler::MyNotifyMethod( EventCode evtCode, OSErrParm err, void* theData )
  38.     {
  39.         cout << "MyNotifyMethod called with";
  40.         cout << " evtCode = " << evtCode;
  41.         cout << " err = " << err;
  42.         cout << " theData = " << (unsigned long) theData << endl;
  43.     }
  44.     
  45. #endif